package com.szt.sy.controller.api.open;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.szt.sy.controller.base.ApiBaseController;
import com.szt.sy.entity.system.Document;
import com.szt.sy.service.system.document.DocumentService;
import com.szt.sy.vo.rep.base.RepBaseVO;

/***
 * 接口-开放-文档
 * 
 * @author wwy
 *
 */
@RestController
@RequestMapping("api/open/document")
public class ApiOpenDocumentController extends ApiBaseController {
	
	@Autowired
	private DocumentService documentService;
	
	@PostMapping("detail")
	public RepBaseVO<Document> documentDetail(String id) {
		RepBaseVO<Document> repVO = new RepBaseVO<>();
		Document document = documentService.selectById(id);
		return repVO.setCommonSuccess().setData(document);
	}
	
}
